cmake_minimum_required(VERSION 3.2)

set (PROJECT_NAME "arrow-go-cc") # 定义了变量PROJECT_NAME为"arrow-go-cc"
project (${PROJECT_NAME} VERSION 1.0.0) 

set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/" "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
message("CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}/")

message (">>> Parent PROJECT_NAME: ${PROJECT_NAME}")
message (">>> Parent PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}")
message (">>> Parent <PROJECT_NAME>_SOURCE_DIR: ${${PROJECT_NAME}_SOURCE_DIR}") 
message (">>> Parent PROJECT_BINARY_DIR: ${PROJECT_BINARY_DIR}")
message (">>> Parent <PROJECT_NAME>_BINARY_DIR: ${${PROJECT_NAME}_BINARY_DIR}")
message (">>> Parent CMAKE_PROJECT_NAME: ${CMAKE_PROJECT_NAME}")

# cc CMakeLists.txt的目录 lib {binary_dir} build/cc生成的库文件或可执行文件的目录
add_subdirectory (cc lib)
# 调用go目录下的CMakeList.txt进行构建
add_subdirectory (go go) 

set(PROJECT_SOURCE_LIST cc go)